'use strict';

const db = uniCloud.database();
const collection = db.collection('blogs');
exports.main = async (event, context) => {
	const res = await collection.get();
	return {
		code: 0,
		data: res.data,
		msg: '获取成功'
	};
};